<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.prime.com.tr/ui">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="Crear Idea de Investigación, Desarrollo e Innovación"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <p:tabView>
                    <p:tab title="Información General">
                        <h:panelGrid columns="2">
                            <h:outputLabel value="#{bundle.CreateIdeaLabel_titulo}" for="titulo" />
                            <h:inputText id="titulo" value="#{ideaController.selected.titulo}" title="#{bundle.CreateIdeaTitle_titulo}" required="true" requiredMessage="#{bundle.CreateIdeaRequiredMessage_titulo}"/>
                            <h:outputLabel value="#{bundle.CreateIdeaLabel_entidad}" for="entidad" />
                            <h:selectOneMenu id="entidad" value="#{ideaController.selected.entidad}" title="#{bundle.CreateIdeaTitle_entidad}" >
                                <f:selectItems value="#{entidadController.itemsAvailableSelectOne}"/>
                            </h:selectOneMenu>
                            <h:outputLabel value="#{bundle.CreateIdeaLabel_subdireccion}" for="subdireccion" />
                            <h:selectOneMenu id="subdireccion" value="#{ideaController.selected.subdireccion}" title="#{bundle.CreateIdeaTitle_subdireccion}" >
                                <f:selectItems value="#{subdireccionController.itemsAvailableSelectOne}"/>
                            </h:selectOneMenu>
                            <h:outputLabel value="#{bundle.CreateIdeaLabel_areainvestigacion}" for="areainvestigacion" />
                            <h:selectOneMenu id="areainvestigacion" value="#{ideaController.selected.areainvestigacion}" title="#{bundle.CreateIdeaTitle_areainvestigacion}" >
                                <f:selectItems value="#{areainvestigacionController.itemsAvailableSelectOne}"/>
                            </h:selectOneMenu>
                            <h:outputLabel value="#{bundle.CreateIdeaLabel_subarea}" for="subarea" />
                            <h:selectOneMenu id="subarea" value="#{ideaController.selected.subarea}" title="#{bundle.CreateIdeaTitle_subarea}" >
                                <f:selectItems value="#{subareaController.itemsAvailableSelectOne}"/>
                            </h:selectOneMenu>
                            <h:outputLabel value="#{bundle.CreateIdeaLabel_subarea1}" for="subarea1" />
                            <h:selectOneMenu id="subarea1" value="#{ideaController.selected.subarea1}" title="#{bundle.CreateIdeaTitle_subarea1}" >
                                <f:selectItems value="#{subarea1Controller.itemsAvailableSelectOne}"/>
                            </h:selectOneMenu>
                            <h:outputLabel value="#{bundle.CreateIdeaLabel_subarea2}" for="subarea2" />
                            <h:selectOneMenu id="subarea2" value="#{ideaController.selected.subarea2}" title="#{bundle.CreateIdeaTitle_subarea2}" >
                                <f:selectItems value="#{subarea2Controller.itemsAvailableSelectOne}"/>
                            </h:selectOneMenu>
                            <h:outputLabel value="#{bundle.CreateIdeaLabel_investigador}" for="investigador" />
                            <h:selectOneMenu id="investigador" value="#{ideaController.selected.investigador}" title="#{bundle.CreateIdeaTitle_investigador}" >
                                <f:selectItems value="#{investigadorController.itemsAvailableSelectOne}"/>
                            </h:selectOneMenu>
                        </h:panelGrid>
                    </p:tab>

                    <p:tab title="Tipo de propuesta de Investigación y Objetivos">
                        <h:panelGrid columns="2">
                            <h:outputLabel value="#{bundle.CreateIdeaLabel_tipoproyecto}" for="tipoproyecto" />
                            <h:selectOneMenu id="tipoproyecto" value="#{ideaController.selected.tipoproyecto}" title="#{bundle.CreateIdeaTitle_tipoproyecto}" >
                                <f:selectItems value="#{tipoproyectoController.itemsAvailableSelectOne}"/>
                            </h:selectOneMenu>
                            <h:outputLabel value="#{bundle.CreateIdeaLabel_objetivoGeneral}" for="objetivoGeneral" />
                            <h:inputText id="objetivoGeneral" value="#{ideaController.selected.objetivoGeneral}" title="#{bundle.CreateIdeaTitle_objetivoGeneral}" />
                            <h:outputLabel value="#{bundle.CreateIdeaLabel_objetivoespecifico}" for="objetivoespecifico" />
                            <h:selectOneMenu id="objetivoespecifico" value="#{ideaController.selected.objetivoespecifico}" title="#{bundle.CreateIdeaTitle_objetivoespecifico}" >
                                <f:selectItems value="#{objetivoespecificoController.itemsAvailableSelectOne}"/>
                            </h:selectOneMenu>
                        </h:panelGrid>
                    </p:tab>
                    <p:tab title="Descripciones">
                        <h:panelGrid columns="2">
                            <h:outputLabel value="#{bundle.CreateIdeaLabel_problema}" for="problema" />
                            <h:inputText id="problema" value="#{ideaController.selected.problema}" title="#{bundle.CreateIdeaTitle_problema}" />
                            <h:outputLabel value="#{bundle.CreateIdeaLabel_antecedente}" for="antecedente" />
                            <h:inputText id="antecedente" value="#{ideaController.selected.antecedente}" title="#{bundle.CreateIdeaTitle_antecedente}" />
                            <h:outputLabel value="#{bundle.CreateIdeaLabel_justificacion}" for="justificacion" />
                            <h:inputText id="justificacion" value="#{ideaController.selected.justificacion}" title="#{bundle.CreateIdeaTitle_justificacion}" />
                            <h:outputLabel value="#{bundle.CreateIdeaLabel_metodologia}" for="metodologia" />
                            <h:inputText id="metodologia" value="#{ideaController.selected.metodologia}" title="#{bundle.CreateIdeaTitle_metodologia}" />
                            <h:outputLabel value="#{bundle.CreateIdeaLabel_resultado}" for="resultado" />
                            <h:inputText id="resultado" value="#{ideaController.selected.resultado}" title="#{bundle.CreateIdeaTitle_resultado}" />
                            <h:outputLabel value="#{bundle.CreateIdeaLabel_palabrasClave}" for="palabrasClave" />
                            <h:inputText id="palabrasClave" value="#{ideaController.selected.palabrasClave}" title="#{bundle.CreateIdeaTitle_palabrasClave}" />

                        </h:panelGrid>
                    </p:tab>
                </p:tabView>
                <br />
                <h:commandLink action="#{ideaController.create}" value="#{bundle.CreateIdeaSaveLink}" />
                <br />
                <br />
                <h:commandLink action="#{ideaController.prepareList}" value="#{bundle.CreateIdeaShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:commandLink value="#{bundle.CreateIdeaIndexLink}" action="/index" immediate="true" />


            </h:form>
        </ui:define>
    </ui:composition>

</html>
